package com.example.dqnm.pojo;

import java.io.Serializable;

/**
 * user
 * @author 
 */
public class User implements Serializable {
    private Integer id;

    private String openid;

    private String nickname;

    private String headimageurl;

    private String phone;

    private String defaultshippingaddress;

    private String defaultstore;

    private static final long serialVersionUID = 1L;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getOpenid() {
        return openid;
    }

    public void setOpenid(String openid) {
        this.openid = openid;
    }

    public String getNickname() {
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }

    public String getHeadimageurl() {
        return headimageurl;
    }

    public void setHeadimageurl(String headimageurl) {
        this.headimageurl = headimageurl;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getDefaultshippingaddress() {
        return defaultshippingaddress;
    }

    public void setDefaultshippingaddress(String defaultshippingaddress) {
        this.defaultshippingaddress = defaultshippingaddress;
    }

    public String getDefaultstore() {
        return defaultstore;
    }

    public void setDefaultstore(String defaultstore) {
        this.defaultstore = defaultstore;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        User other = (User) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getOpenid() == null ? other.getOpenid() == null : this.getOpenid().equals(other.getOpenid()))
            && (this.getNickname() == null ? other.getNickname() == null : this.getNickname().equals(other.getNickname()))
            && (this.getHeadimageurl() == null ? other.getHeadimageurl() == null : this.getHeadimageurl().equals(other.getHeadimageurl()))
            && (this.getPhone() == null ? other.getPhone() == null : this.getPhone().equals(other.getPhone()))
            && (this.getDefaultshippingaddress() == null ? other.getDefaultshippingaddress() == null : this.getDefaultshippingaddress().equals(other.getDefaultshippingaddress()))
            && (this.getDefaultstore() == null ? other.getDefaultstore() == null : this.getDefaultstore().equals(other.getDefaultstore()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getOpenid() == null) ? 0 : getOpenid().hashCode());
        result = prime * result + ((getNickname() == null) ? 0 : getNickname().hashCode());
        result = prime * result + ((getHeadimageurl() == null) ? 0 : getHeadimageurl().hashCode());
        result = prime * result + ((getPhone() == null) ? 0 : getPhone().hashCode());
        result = prime * result + ((getDefaultshippingaddress() == null) ? 0 : getDefaultshippingaddress().hashCode());
        result = prime * result + ((getDefaultstore() == null) ? 0 : getDefaultstore().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", openid=").append(openid);
        sb.append(", nickname=").append(nickname);
        sb.append(", headimageurl=").append(headimageurl);
        sb.append(", phone=").append(phone);
        sb.append(", defaultshippingaddress=").append(defaultshippingaddress);
        sb.append(", defaultstore=").append(defaultstore);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}